package com.snopzyz.hello.databus.config;

import com.github.shyiko.mysql.binlog.BinaryLogClient;
import com.github.shyiko.mysql.binlog.event.EventData;
import com.github.shyiko.mysql.binlog.event.EventHeader;
import com.github.shyiko.mysql.binlog.event.WriteRowsEventData;
import com.snopzyz.hello.databus.domain.Column;
import com.snopzyz.hello.databus.domain.properties.BinlogProperties;
import com.snopzyz.hello.databus.manager.BinlogHandlerManager;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

@Configuration
@EnableConfigurationProperties(BinlogProperties.class)
public class BinlogAutoConfiguration {

    @Bean
    public BinlogHandlerManager binlogHandlerManager(BinlogProperties properties) {
        return new BinlogHandlerManager(properties);
    }

}
